﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CIT.WMS.Transefer;

namespace CIT.WMS.Product
{
    public partial class FrmProductMain : Form
    {
        public FrmProductMain()
        {
            InitializeComponent();
        }


        private void btn_In_Click(object sender, EventArgs e)
        {
            FrmCheckUser frm = new FrmCheckUser();
            frm.ShowDialog();
            if (frm.flag)
            {
                FrmProductIn fpi = new FrmProductIn();
                fpi.ShowDialog();
            }
        }

        private void btn_Out_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmProductOut f = new FrmProductOut();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmProductOut f = new FrmProductOut();
                f.ShowDialog();
            }
        }

        private void btn_back_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmProductBack f = new FrmProductBack();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmProductBack f = new FrmProductBack();
                f.ShowDialog();
            }
        }

        private void btn_inTorr_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmProductInByTorr f = new FrmProductInByTorr();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmProductInByTorr f = new FrmProductInByTorr();
                f.ShowDialog();
            }
        }

        private void btn_SalesBack_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmSalesBack f = new FrmSalesBack();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmSalesBack f = new FrmSalesBack();
                f.ShowDialog();
            }
        }

        private void btn_TranseOut_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmTranseferOut f = new FrmTranseferOut();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmTranseferOut f = new FrmTranseferOut();
                f.ShowDialog();
            }
        }

        private void btn_TranseIn_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmTranseferIn f = new FrmTranseferIn();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmTranseferIn f = new FrmTranseferIn();
                f.ShowDialog();
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmProductIn f = new FrmProductIn();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmProductIn f = new FrmProductIn();
                f.ShowDialog();
            }
        }

        private void btn_backEnd_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmProductBackEnd f = new FrmProductBackEnd();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmProductBackEnd f = new FrmProductBackEnd();
                f.ShowDialog();
            }
        }

    }
}